package com.zeroup.auto.assists.step.unify;

import android.graphics.Path;

import androidx.annotation.NonNull;

import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.ScreenUtils;
import com.ven.assists.Assists;
import com.ven.assists.AssistsWindowManager;
import com.ven.assists.stepper.Step;
import com.ven.assists.stepper.StepCollector;
import com.zeroup.auto.assists.DouYinBaseStep;
import com.zeroup.auto.assists.kt.MyContinuation;
import com.zeroup.auto.assists.next.StepBeanData;
import com.zeroup.auto.assists.step.unify.bean.DyFosterValue;
import com.zeroup.auto.utils.AssistsUtils;

/**
 * 清理进程
 */
public class ClearProcessStep extends DouYinBaseStep {




    @Override
    public void onImpl(@NonNull StepCollector stepCollector) {
        stepCollector.next(1,false,(i,c)->{//  模仿手势进入进程列表
            Path mPath=new Path();//线性的path代表手势路径,点代表按下,封闭的没用
            AssistsWindowManager.INSTANCE.switchNotTouchableAll();
            MyContinuation myContinuation = new MyContinuation();
            int y = ScreenUtils.getAppScreenHeight() / 2;
            mPath.moveTo(0, y);
            mPath.lineTo(0, y);
            Assists.gesture(mPath,0,2000, myContinuation); //上滑
            AssistsWindowManager.INSTANCE.switchTouchableAll();
            return  Step.Companion.get(2,this.getClass(),null,1000);
        }).next(2,false,(i,c)->{// 点击清理按钮
            Object serviceData = AssistsUtils.getServiceData(i.getData());
            Assists.INSTANCE.findById("");
            return  Step.Companion.getNone();
        });
    }
}
